@extends('admin.main')
@section('content')

    <div id="dcMain">
        <!-- 当前位置 -->
        <div id="urHere">管理中心<b>></b><strong>用户管理</strong> </div>   <div class="mainBox" style="height:auto!important;height:550px;min-height:550px;">
            <h3>用户收货地址</h3>
            <div class="filter">
                <form action="/user/address" method="get">
                    <select name="status">
                        <option value="">选择状态</option>
                        @foreach(config('admin.address.status') as $k=>$v)
                            <option value="{{$k}}">{{$v}}</option>
                        @endforeach
                    </select>
                    <input name="user_id" class="inpMain" value="" size="20" type="text" placeholder="请输入用户ID">
                    <input name="mobile" class="inpMain" value="" size="20" type="text" placeholder="请输入手机号">
                    <input class="btnGray" value="筛选" type="submit">
                </form>
            </div>
            <table width="100%" border="0" cellpadding="8" cellspacing="0" class="tableBasic">
                <tr>
                    <th width="30" align="center">ID</th>
                    <th width="30" align="center">用户ID</th>
                    <th width="50" align="center">省/市/区</th>
                    <th width="120" align="center">地址</th>
                    <th width="50" align="center">手机</th>
                    <th width="30" align="center">状态</th>
                    <th width="30" align="center">默认地址</th>
                    <th width="50" align="center">创建时间</th>
                    <th width="50" align="center">更新时间</th>
                </tr>
                @foreach($data as $item)
                <tr>
                    <td align="center">{{$item['id']}}</td>
                    <td align="center">{{$item['user_id']}}</td>
                    <td align="center">{{$item['province']}}/{{$item['city']}}/{{$item['area']}}</td>
                    <td align="center">{{$item['address']}}</td>
                    <td align="center">{{$item['mobile']}}</td>
                    <td align="center">{{config('admin.address.status')[$item['status']]}}</td>
                    <td align="center">{{config('admin.address.is_default')[$item['is_default']]}}</td>
                    <td align="center">{{$item['created_at']}}</td>
                    <td align="center">{{$item['updated_at']}}</td>
                </tr>
                @endforeach
            </table>
            @include('admin.layouts.page')
        </div>
    </div>
@stop
@section('script')
    <script>
        @if(!empty($searchData))
        @foreach($searchData as $k=>$v)
            $('[name="{{$k}}"]').val('{{$v}}');
        @endforeach
        @endif
    </script>
@stop